export default defineEventHandler((event) => {
    const config = useRuntimeConfig(event)
    console.log('baseURL', config.public.apiBase)
    return new Promise((resolve, reject) => {
        $fetch('http://lyw.cdbytech.top:3017/api/wnHistoryRecord', {
            baseURL: config.public.apiBase,
            body: {
                name: 'wangli',
            },
            method: 'post',
            onRequest({request, options}) {
                // 设置请求头
                options.headers.append('Authorization', '122')
            },
        }).then(res => {
            console.log('_res', res)
        }).catch(e => {
            console.log('_e', e)
        })
    })
})
